import VueRouter from 'vue-router';
import Vue from 'vue';

Vue.use(VueRouter);

const routes = [
  ...require('./start').default,
  ...require('./dashboard').default,
  ...require('./errorPages').default,
];

const globalRouters = new VueRouter({
  routes
});

globalRouters.beforeEach((to, from, next) => {
  next();
});

export default globalRouters;
